<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>嘉宾列表</title>
    <link rel="stylesheet"  th:href="@{/bootstrap.css}">
</head>
<body class="container">
<h2>嘉宾如下那些人</h2>
<br>
<table class="table table hover">
    <thead>
        <tr>
            <th>名字</th>
            <th>角色</th>
        </tr>
    </thead>
    <tbody>
    <tr th:each="guest:${guestlist}">
        <td th:text="${guest.name}">name</td>
        <td th:text="${guest.role}">role</td>
        <td>
            <a th:href="@{/guest/toUpdate(name=${guest.name})}" class="btn btn-info">编辑</a>
        </td>
        <td>
            <a th:href="@{/guest/delete(name=${guest.name})}" class="btn btn-info">删除</a>
        </td>
    </tr>

    </tbody>
</table>
<div class="form-group">
    <div class="col-sm-2 control-label">
        <a href="/guest/toadd" th:href="@{/guest/toadd}"  class="btn btn-info"> 添加</a>
    </div>

</div>

</body>
</html>